<template>
  <div>
    <Row>
    <Card>
      <Table border :columns="columns1" :data="data1"></Table>
    </Card>
    </Row>

  </div>
</template>
<style scoped>

</style>
<script type="text/ecmascript-6">

  export default {
    beforeMount () {

    },
    mounted() {

    },
    data () {
      return {
        columns1: [
          {
            type: 'selection',
            width: 60,
            align: 'center'
          },
          {
            title: '设备编号',
            key: 'name1'
          },
          {
            title: '站点名称',
            key: 'name2'
          },
          {
            title: '站点地址',
            key: 'name3'
          },
          {
            title: '设备名称',
            key: 'name4'
          },
          {
            title: '处理状态',
            key: 'name5'
          },
          {
            title: '操作',
            key: 'action',
            width: 180,
            align: 'center',
            render: (h, params) => {
              return h('div', [
                h('Button', {
                  props: {
                    type: 'primary',
                    size: 'small'
                  },
                  style: {
                    marginRight: '5px'
                  },
                  on: {
                    click: () => {
                      console.log(JSON.stringify(params));
                      this.goToDetail(params);
                    }
                  }
                }, '详情'),
                h('Button', {
                  props: {
                    type: 'warning',
                    size: 'small'
                  },
                  style: {
                    marginRight: '5px'
                  },
                  on: {
                    click: () => {
                      console.log(JSON.stringify(params));
                    }
                  }
                }, '处理')
              ]);

            }
          }
        ],
        data1: [
          {
            name1: 'SB2017052510001',
            name2: '嘉兴市嘉通加气站',
            name3: 'xxx',
            name4: '2#安全阀',
            name5: '待处理',
          },
          {
            name1: 'SB2017052510001',
            name2: '嘉兴市嘉通加气站',
            name3: 'xxx',
            name4: '2#安全阀',
            name5: '待处理',
          },
        ],
      }
    },
    methods: {

    }

  };
</script>
